<!--前台管理页面页眉（功能已实现）-->
<template>
  <div style="text-align: left; font-size: 12px; line-height: 60px; display: flex;margin-left:950px">
      
    <!--右侧下拉框（功能已实现）-->
    <el-dropdown style="width: 70px; cursor: pointer">
      <span style="color:#409EFF">{{this.username}}</span><i class="el-icon-arrow-down" style="margin-left: 5px;color:#409EFF"></i>
      <el-dropdown-menu slot="dropdown">
        <el-dropdown-item @click.native="info">个人信息</el-dropdown-item>
        <el-dropdown-item @click.native='backlogin'>退出登录</el-dropdown-item>
      </el-dropdown-menu>
    </el-dropdown>
  </div>
</template>

<script>
export default {
  name: "ManagerHeader",
  data(){
  	return{
  		username:'管理员'
  	}
  },
  created(){
  	//alert(sessionStorage.getItem('uinfo'));
  	var restore=JSON.parse(sessionStorage.getItem('uinfo'));
  	//alert(restore.uname);
  	this.username=restore.uname;
  },
  methods:{
  	backlogin(){
  		this.$router.push('/login');//退出系统
  	},
  	info(){
  		this.$router.push('/managerInfo');//个人用户界面
  	}
  },
  props: {
    //参数传递（装饰用）
    collapseBtnClass: String,
    collapse: Boolean
  }
}
</script>

<style scoped>

</style>